package structure.concrete;

import structure.interfaces.INode;
import structure.interfaces.IOperatorNullary;

/**
 * this class represent the variable x in the chromosome
 * the class implements INode interface and therefore functions 
 * documentation can be found inside INode.java
 */
public class Variable extends IOperatorNullary {

	@Override
	public double getValue(double x) {
		return x;
	}

	@Override
	public String getDescription() {
		return "x";
	}
	
	public Variable clone() {
		return new Variable();
	}
	
	public INode clone(INode crossNode, INode newSubTree) { 
		if (this == crossNode) 
			return newSubTree.clone();
		else
			return new Variable();
	}
	
}
